package jmine.tec.datadigester.positional.meta.factory;

import java.beans.PropertyDescriptor;

import jmine.tec.datadigester.positional.annotations.PositionalLongEntry;
import jmine.tec.datadigester.positional.meta.PositionalFieldMetadata;
import jmine.tec.datadigester.positional.meta.PositionalLongFieldMetadata;

/**
 * {@link PositionalFieldAnnotationSupport} para writers de campos Long
 * 
 * @author israel.crisanto
 */
public class PositionalLongAnnotationSupport implements PositionalFieldAnnotationSupport<PositionalLongEntry> {

    /**
     * {@inheritDoc}
     */
    public PositionalFieldMetadata create(PropertyDescriptor property, PositionalLongEntry a) {
        return new PositionalLongFieldMetadata(property, a.description(), a.start(), a.size());
    }

    /**
     * {@inheritDoc}
     */
    public Class<PositionalLongEntry> annotationClass() {
        return PositionalLongEntry.class;
    }
}